<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
<%@ include file="/jsp/commons/path.jsp"%>
<%@ include file="/jsp/commons/head.jsp"%>
<%@ include file="/jsp/commons/easyui.jsp"%>
<script type="text/javascript">
function update() {
	 
	var userId = $.trim($('#userId').val());
	var password = $.trim($('#password').val());
	
	$.ajaxEx({
		type : 'post',
		url : '${ctx}/user/update.do',
		data : {
			userId : userId,
			password : password,
		 
		},
		dataType : 'json',
		success : function(data) {
			alert(data);
			var result = data.result;
			if(result == 'success') {
					 
					} else {
						$.messager.alert('提示', '操作失败！<br />' + data.error, 'error');
					}
		},
		error : ajaxError
	});
}
function loginOut() {
	 
	 
	
	$.ajaxEx({
		type : 'post',
		url : '${ctx}/login/loginOut.do',
		data : {
		},
		dataType : 'json',
		success : function(data) {
			alert(data);
			var result = data.result;
			if(result == 'success') {
					window.location.href = '${ctx}/login/noLogin.do';
					} else {
						$.messager.alert('提示', '操作失败！<br />' + data.error, 'error');
					}
		},
		error : ajaxError
	});
}
</script>
</head>
<body>
 当前用户: ${user_session.userName}
<div region="north" class="easyui-panel" iconCls="icon-title" border="false" style="overflow: hidden; height: 116px">
	<table class="table2"  search="loadList" style="border-bottom: 1px solid #ccc">
		<tr height="60px">
			<td style="padding-left: 20px;">
				更新：
				<input id="userId" type="text" style="margin-right: 50px" />
				证件号码：
				<input id="password" type="text" style="margin-right: 50px" />
				 
			</td>
			<td align="right">
				<a href="#" class="easyui-linkbutton" icon="icon-search" onclick="update()" style="margin-right: 10px">更新</a>
				<a href="#" class="easyui-linkbutton" icon="icon-search" onclick="loginOut()" style="margin-right: 10px">退出</a>
			</td>
			
		</tr>
		
	</table>
</div>
	
	
</body>
</html>